# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'autoconf'
    version = '2.69'
    licenses = [License.GPLv2Plus]
    stype = SourceType.TARBALL
    url = 'gnu://'
    tarball_checksum = '64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684'
    deps = ['m4']

    files_bin = [
        'bin/autoconf', 'bin/autoheader',
        'bin/autom4te', 'bin/autoreconf',
        'bin/autoscan', 'bin/autoupdate',
        'bin/ifnames']

    files_share = ['share/autoconf']

    def prepare(self):
        # The m4 release we build is buggy in windows so we use the
        # default one provided with mingw/msys
        if self.config.target_platform == Platform.WINDOWS:
            self.deps.remove('m4')
            self.set_env('M4', '/bin/m4')
